//
//  GMPackCell.m
//  Teecloud
//
//  Created by 小熊 on 2018/10/31.
//  Copyright © 2018年 小志. All rights reserved.
//

#import "GMPackCell.h"
#import "GMMyclassModel.h"
@interface GMPackCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleName;
@property (weak, nonatomic) IBOutlet UIButton *biaoqian;
@property (weak, nonatomic) IBOutlet UILabel *desLab;
@property (weak, nonatomic) IBOutlet UILabel *contLab;

@end
@implementation GMPackCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.biaoqian.layer.borderWidth =1.0;
    self.biaoqian.layer.borderColor =[UIColor colorWithHexString:@"FF8D00"].CGColor;
    self.biaoqian.layer.cornerRadius=5;
}
-(void)setModel:(GMMyclassModel *)model{
    [self.biaoqian setTitle:[NSString stringWithFormat:@"  %@  ",model.ResTypeName] forState:UIControlStateNormal];
    self.titleName.text = model.Name;
    self.desLab.text = model.FromName;
    if ([model.ResType isEqualToNumber:@(1)]) {
        /**视频*/
        self.contLab.text = [NSString stringWithFormat:@"%@分钟",model.TimeLen];
        
    }else if ([model.ResType isEqualToNumber:@(2)]){
        /**文档*/
        self.contLab.text = [NSString stringWithFormat:@"%@页",model.PageCount];
        
    }else if ([model.ResType isEqualToNumber:@(3)]){
        /**习题*/
        self.contLab.text = [NSString stringWithFormat:@"%@题",model.ExerCount];
        
    }else if ([model.ResType isEqualToNumber:@(4)]){
        /**试卷*/
        self.contLab.text = [NSString stringWithFormat:@"%@题",model.ExerCount];
        
    }else if ([model.ResType isEqualToNumber:@(5)]){
        /**考试*/
         self.contLab.text = [NSString stringWithFormat:@"%@题",model.ExerCount];
    }
}

@end

